<!--<?php
//load library
include("config.php");

//define parameters
$zone=($_GET["zone"]==""?"homepage":$_GET["zone"]);
$arrMenu=array
(
	"homepage"=>array("vnTitle"=>"Trang chủ","vnTitle2"=>"Trang chu","width"=>124,),
	"introduction"=>array("vnTitle"=>"Giới thiệu","vnTitle2"=>"Gioi thieu","width"=>119,),
	"searchproduct"=>array("vnTitle"=>"Sản phẩm","vnTitle2"=>"San pham","width"=>123,),
	"humanresources"=>array("vnTitle"=>"Đội ngũ nhân sự","vnTitle2"=>"Doi ngu nhan su","width"=>165,),
	"contact"=>array("vnTitle"=>"Liên hệ","vnTitle2"=>"Lien he","width"=>106,),
	"product"=>array("vnTitle"=>"Chi tiết sản phẩm","vnTitle2"=>"Chi tiet san pham","width"=>"",),
	"actioncontact"=>array("vnTitle"=>"Liên hệ","vnTitle2"=>"Lien he","width"=>"",),
	"news"=>array("vnTitle"=>"Thông tin sản phẩm","vnTitle2"=>"Thong tin san pham","width"=>"",),
);
$arrMenuKey=array_keys($arrMenu);

//connect db
Model::connect();

//get configs
$sqlConfig="SELECT * FROM tbl_config";
$resConfig=mysql_query($sqlConfig) ;
while($rowConfig=mysql_fetch_array($resConfig))
{
	$rowConfigs[$rowConfig['key']]=$rowConfig["content"];
}

//get apikey
$apikey=$rowConfigs["apikey"];

//get description, keywords, title
$title="";
$keywords=$rowConfigs['keywords'];
if($zone=="introduction" ||  $zone=="humanresources" || $zone=="contact")
{
	$description =strip_tags($rowConfigs[$zone]);
} 
else if($zone=="product")
{
	$sqlProduct="(SELECT * FROM tbl_product WHERE `id`='$_GET[id]') UNION (SELECT * FROM tbl_product WHERE `id`<>'$_GET[id]' LIMIT 0,4)";
	$resProduct=mysql_query($sqlProduct) ;
	$rowProduct=mysql_fetch_array($resProduct);
	$description = "Sản phẩm:$rowProduct[name] $rowProduct[quote].Mã hàng:$rowProduct[code].Đơn vị tính:$rowProduct[unit].Thông tin chi tiết:".strip_tags($rowProduct["detail"]);
	$title=$rowProduct['name'];
}
else if($zone=="searchproduct")
{
	$sqlProductType="SELECT * FROM tbl_product_type WHERE `id`='$_GET[type]'";
	$resProductType=mysql_query($sqlProductType) ;
	$rowProductType=mysql_fetch_array($resProductType);
	$description="Nhóm sản phẩm:$rowProductType[name].Thông tin chi tiết:".strip_tags($rowProduct["detail"]);
	$title=$rowProductType['name'];
}
else //$zone=="homepage"
{
	$description = $rowConfigs['banner'];
}
if($title!="")
	$title.=" - ";
	
//number character to trim product's detail
$numChar=300;
?>-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<title><? echo $title;?><?php echo $arrMenu[$zone]["vnTitle2"];?> - Phu Trung Hoa</title>
	
<link rel="stylesheet" href="index_files/base.css" type="text/css">
<link rel="stylesheet" href="index_files/mac.css" type="text/css">
<link rel="stylesheet" type="text/css" href="css/index.css">

<script src="modules/js/jquery/jquery-1.5.1.js" type="text/javascript"></script>

<link rel="stylesheet" type="text/css" href="modules/js/menu/menu.css">
<script src="modules/js/menu/menu.js" type="text/javascript"></script>

<script type="text/javascript" src="modules/js/crawler/crawler.js"></script>

<meta content='<?php echo $keywords?>' name='keywords'>
<meta content='<?php echo $description?>' name='description'>

</head>
<body style="width:100%;font: 12px/18px  sans-serif,Lucida Grande, Lucida Sans Unicode, Arial, Verdana;" <? if ($zone=="contact") { ?> onLoad="initialize();" onUnload="GUnload();" <?php } ?>>
<div id="main" style='width:100%;text-align:center;' align='center'>

<!---------------->
<!-- BEGIN MENU --> 
<!---------------->

	<script>
		function mouseDown()
		{
			if(document.getElementById('mKeyword').value=='Tìm kiếm')
				document.getElementById('mKeyword').value='';
		}
		function blur()
		{
			if(document.getElementById('mKeyword').value=='')
				document.getElementById('mKeyword').value='Tìm kiếm';
		}
	</script>
	<div id='menu'>
		<div id='left'></div>
		<div class='bar_normal' id="logo">
			<img onclick="window.location='index.php'"	src='images/menu_logo.jpg' alt='Phú Trung Hoa'/> 
		</div>
		<div id='right'></div>
		<div class='bar_normal' id="search">
			<form name='mFormSearch' action="index.php" method="GET">
				<input type='hidden' name='zone' value='searchproduct'/>
				<div id='left'></div>
				<input type='text' value="Tìm kiếm" id='mKeyword' name='mKeyword' onMouseDown="mouseDown()" onBlur="blur()"></input>			
				<div id='right'></div>
			</form> 
		</div>
		<div class='space'></div>
		<?php 		
			for($i=count($arrMenu)-1;$i>=0;$i--)
			{		
				$key=$arrMenuKey[$i];	
				if($arrMenu[$key]["width"]!="")
				{
					if($key=='searchproduct')
					{
						$sql="SELECT * FROM tbl_product_type ORDER BY id DESC";
						$res=mysql_query($sql);						
						echo "<div class='bar_normal' ".($zone==$key?"id='selected'":"")." id='$key' style='width:".$arrMenu[$key]["width"]."px' onclick=\"window.location='?zone=$key'\">";
						if(strpos($_SERVER[HTTP_USER_AGENT],"MSIE")!==false)
							$style="margin-left:-63px";
						else if(strpos($_SERVER[HTTP_USER_AGENT],"Firefox")!==false)
							$style="";
						//echo $_SERVER[HTTP_USER_AGENT];*/
						?>
						<ul id="jsddm" style="<?php echo $style;?>">
							<li >
								<a href="#" style="<? echo "width:".($arrMenu[$key]["width"]+2)."px;";echo $zone=='searchproduct'?'color:white':''?>"><span style='position:relative;top:12px;'><?php echo $arrMenu[$key]["vnTitle"]?></span></a>
								<ul>
									<?php 
									if(mysql_num_rows($res)>0)
									{
										while($row=mysql_fetch_array($res))					
										{					
											echo Controller::createMenuItem("?zone=searchproduct&type=$row[id]",$row['name']);
										}
									}?>
								</ul>
							</li>
						</ul>
						<?php 
						echo "</div>";
					}
					else 
					{
						echo "<div class='bar_normal' ".($zone==$key?"id='selected'":"")." id='$key' style='width:".$arrMenu[$key]["width"]."px' onclick=\"window.location='?zone=$key'\">".$arrMenu[$key]["vnTitle"]."</div>";
					}
					echo "<div class='space'></div>";
				}		
			}
		?>
	</div> 
	
<!-------------->
<!-- END MENU --> 
<!-------------->

<!--------------------------->
<!-- BEGIN PRODUCT BROWSER --> 
<!--------------------------->

<div id='div_product_browser' style="margin: auto;clear: both;width: 990px;height:328px;">
	<div style='position:relative;top:48%;'><img style='vertical-align:middle' src='modules/js/ajax/loading.gif' alt='Loading...'/>&nbsp;&nbsp;Đang tải dữ liệu sản phẩm ...</div>
</div>
<script>
$(document).ready(function() {
	$.ajax({
	  url: 'modules/index/productBrowser.php',
	  cache: false,
	  success: function(html) {
		$("#div_product_browser").html(html);
	  }
	});
 });
</script>

<!------------------------->
<!-- END PRODUCT BROWSER --> 
<!------------------------->

<div id="content" style="padding-top:0px" align='center'>

<table cellpadding="0" cellspacing="0">
	<tr>
		<td valign='top'>
		
<!--------------------->	
<!-- BEGIN BOXSEARCH -->
<!--------------------->
		
		<div class="column first sidebar" style='float:none;margin-bottom:5px;'>
		<div class="box getamac" style='width:186px;padding-left:0px;padding-right:0px'>
		<div class="cap top"></div>
		<h2 style='width:182px;margin-left:2px;margin-right:2px;padding-right:0px;padding-left:0px;text-align:left'><a style='font-weight:bold;color:#333;width:100%;margin-left:10px'>Tìm kiếm nâng cao</a></h2>
		<ul style='width:162px;margin-left:12px;margin-right:2px;padding-right:0px;padding-left:0px'>
			<li>
				<form name='bFormSearch' method='POST' action='index.php?zone=searchproduct'>
					<table cellpadding="0" cellspacing="0" width="100%">
						<tr>
							<td colspan='2'>
								<select style='width: 100%;' name='bRange'>
									<option value='product'>Sản phẩm</option>
									<option value='website'>Website</option>									
								</select>								
							</td>
						</tr>
						<tr>
							<td align='right'>
								<input style='width: 120px;border-width:2px' type='textbox' name='bKeyword'></input>
							</td>
							<td width='40px' align='left'>
								<input type="submit" value='Tìm' style='width: 100%'></input>
							</td>
						</tr>
					</table>
				</form>
			</li>
			<li style='text-align:left'>
				Tìm kiếm sản phẩm, nội dung trang web theo từ khóa bạn nhập vào
			</li>
		</ul>
		<div class="cap bottom"></div>
		</div>
		<!--/getamac--></div>
<!------------------->	
<!-- END BOXSEARCH -->
<!------------------->

<!-------------------->
<!-- BEGIN BOXMONEY --> 
<!-------------------->
		
		<div class="column first sidebar" style='float:none;margin-bottom:5px;'>
		<div class="box getamac" style='width:186px;padding-left:0px;padding-right:0px'>
		<div class="cap top"></div>
		<h2 style='width:182px;margin-left:2px;margin-right:2px;padding-right:0px;padding-left:0px;text-align:left'><a style='margin-left:10px;font-weight:bold;color:#333;width:100%;'>Tỉ giá, ngoại tệ</a></h2>
		<ul style='width:162px;margin-left:12px;margin-right:2px;padding-right:0px;padding-left:0px'>
			<li>	
			<script type="text/javascript" src="http://vnexpress.net/Service/Forex_Content.js"></script>
			<table width="100%" border="0" cellspacing="0" cellpadding="2">
				<tr>
					<th align='left'>Loại ngoại tệ</th>
					<th style='text-align:right'>Bán</th>
				</tr>
				<?php
				for($i=0;$i<9;$i++)
				{
					?>
				<tr>
					<td align='left'>
						<script> 
							document.write(vForexs[<?php echo $i?>]);
						</script>
					</td>
					<td align='right'>
						<script> 
							document.write(vCosts[<?php echo $i?>]);
						</script>
					</td>
				</tr>
				<?php
				}
				?>
				<tr>
					<td colspan="2" align="right">
						<label style="font-family: arial; font-style: italic; font-variant: normal; font-weight: normal; font-size: 10px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(145, 144, 144);">
							Nguồn: <a href="http://www.eximbank.com.vn" target="_blank"><img style="border: 0px none; vertical-align: middle; display: inherit" src="images/boxmoney_logo.gif" alt='http://www.eximbank.com.vn'></a>
						</label>
					</td>
				</tr>
			</table>
			</li>
		</ul>
		<div class="cap bottom"></div>
		</div>
		<!--/getamac--></div>

<!-------------------->
<!-- END BOXMONEY ---> 
<!-------------------->

<!-------------------->
<!-- BEGIN BOXGOLD ---> 
<!-------------------->
			
		<div class="column first sidebar" style='float:none;margin-bottom:5px;'>
		<div class="box getamac" style='width:186px;padding-left:0px;padding-right:0px'>
		<div class="cap top"></div>
		<h2 style='width:182px;margin-left:2px;margin-right:2px;padding-right:0px;padding-left:0px;text-align:left'><a style='font-weight:bold;color:#333;margin-left:10px;width:100%;'>Giá vàng</a></h2>
		<ul style='width:162px;margin-left:12px;margin-right:2px;padding-right:0px;padding-left:0px'>
			<li>	
				<script type="text/javascript" src="http://vnexpress.net/Service/Gold_Content.js"></script>
				<table cellpadding="2" cellspacing="0" border="0" width="100%">
					<tr> 
						<th style='width:20%'>Loại</th> 
						<th style='text-align: right;width:40%'>Mua</th> 
						<th style='text-align: right;width:40%'>Bán</th> 
					</tr> 	
					<tr>
						<td>SBJ</td>
						<td align='right'>
							<script> 
								document.write(vGoldSbjBuy);
							</script> 			
						</td>
						<td align='right'>
							<script> 
								document.write(vGoldSbjSell);
							</script>
						</td> 
					</tr>
					<tr>
						<td>SJC</td> 
						<td align='right'>
							<script> 
								document.write(vGoldSjcBuy);
							</script>
						</td>
						<td align='right'>
							<script> 
								document.write(vGoldSjcSell);
							</script>
						</td>
					</tr>
					<tr>
						<td colspan="3" align='right'>
							<label style="font-family: arial; font-style: italic; font-variant: normal; font-weight: normal; font-size: 10px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(145, 144, 144);">
								Nguồn: <a href="http://www.sacombank-sbj.com" target="_blank"><img alt='http://www.sacombank-sbj.com' style="border: 0px none ; vertical-align: middle; width: 80px; height: 9px;display:inherit;" src="images/boxgold_logo.gif" ></a>
							</label>
						</td>
					</tr>		
				</table>
			</li>
		</ul>
		<div class="cap bottom"></div>
		</div>
<!--/getamac--></div>
	
	
<!------------------>
<!-- END BOXGOLD ---> 
<!------------------>

<!---------------------->
<!-- BEGIN BOXPRODUCT --> 
<!---------------------->

		<div class="column first sidebar" style='float:none;margin-bottom:5px;'>
		<div class="box getamac" style='width:186px;padding-left:0px;padding-right:0px'>
		<div class="cap top"></div>
		<h2 style='width:182px;margin-left:2px;margin-right:2px;padding-right:0px;padding-left:0px;text-align:left;'><a style='font-weight:bold;color:#333;margin-left:10px;width:100%;'>Sản phẩm khác</a></h2>
		<ul style='padding-bottom:1px;width:162px;margin-left:12px;margin-right:2px;padding-right:0px;padding-left:0px'>
			<?php 
			$sql="SELECT * FROM tbl_product WHERE `image`<>'' ORDER BY RAND() LIMIT 6";
			$res=mysql_query($sql) ;
			if(mysql_num_rows($res)>0)
			{
				while($row=mysql_fetch_array($res))					
				{					
					if($row["image"]=="")
						$src="images/productbrowser_noimage.jpg";
					else
					{
						$o_src=$src="_thumbs/images/product/$row[image]";
						if(!file_exists($src))
							$src="images/productbrowser_noimage.jpg";
					}				
					echo
					"<li style='border-bottom:0 none'>
						<a href='?zone=product&id=$row[id]' title='$row[quote]'> 
							<table cellspacing='0' style='padding: 0pt; border: medium none; margin: 0pt;width:100%; border-collapse: collapse;'>
								<tbody style='padding: 0pt; border: medium none; margin: 0pt;'>
									<tr style='padding: 0pt; border: medium none; margin: 0pt; height: 10px;'>
										<td>
										</td>
										<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px 0px transparent; width: 10px;'>
										</td>
										<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px -40px transparent;  width: 10px;'>
										</td>
										<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 10px 0px transparent; width: 10px;'>
										</td>
										<td>
										</td>
									</tr>
									<tr style='padding: 0pt; border: medium none; margin: 0pt; height: auto;'>
										<td>
										</td>
										<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px -80px transparent; '>
										</td>						
										<td style='padding: 0pt; border: medium none; margin: 0pt; position: relative; background-color:#FFFFFF;' valign='bottom' align='center'>
											<img alt='$row[alt]' width='158px' title='$o_src' src='$src'/>
										</td>
										<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 10px -80px transparent; '>
										</td>
										<td>
										</td>
									</tr>
									<tr style='padding: 0pt; border: medium none; margin: 0pt;height: 10px;'>
										<td>
										</td>
										<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px -30px transparent; '>
										</td>
										<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt;  background: url(images/rounded_white.png) repeat scroll 0px -70px transparent;'>							
										</td>
										<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 10px -30px transparent; '>
										</td>
										<td>
										</td>
									</tr>
								</tbody>
								</table>
							<h3 style='margin-top:4px'>".($row["name"]==""?"&nbsp;":$row["name"])."</h3>
						</a>
					</li>";
				}
			}
			?>	
		</ul>
		
		<a href="http://www.sacombank-sbj.com" style="margin:5px 12px 12px auto;float:right;font-family: arial; font-style: italic; font-variant: normal; font-weight: normal; font-size: 10px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(145, 144, 144);">
			Xem tất cả
		</a>
		
		<div class="cap bottom"></div>
		</div>
		<!--/getamac--></div>		
		
<!-------------------->
<!-- END BOXPRODUCT --> 
<!-------------------->
		
		<td style='width:12px'>
		</td>
		<td valign='top' align='left' >
		
<!---------------------->	
<!-- BEGIN BOXCONTENT -->
<!---------------------->
		
		<div class="grid3col lower" style='width: 100%;' >
		<div class="box full" style='width:790px;padding-left:2px;padding-right:0px;height:auto' >
		<div class="cap top" style='margin-left:-2px;margin-right:0px;'></div>
			<h2 style='width:788px;margin-left:0px;margin-right:2px;padding-right:0px;padding-left:0px'><a style='font-weight:bold;color:#333;width:100%;margin-left:10px;' id='main_title'><?php echo $arrMenu[$zone]["vnTitle"];?></a></h2>
			<div style='margin-left:10px;margin-right:10px;margin-top:5px;width:770px;' id="main_content" >
			
				<?php 
				if($zone=="product")
				{
					$contactContent=urlencode("Mã hàng\t\t\t: $rowProduct[code]\nSản phẩm\t\t: $rowProduct[name]\n$rowProduct[quote]\nSố lượng cần mua\t: ");
					$o_src="images/product/".$rowProduct['image'];
					if($rowProduct["image"]==""||!file_exists("images/product/".$rowProduct['image']))
					{	
						$src="images/productbrowser_noimage.jpg";
						$w=500;
						$h=376;
					}
					else
					{
						$src="images/product/$rowProduct[image]";
						$size=getimagesize($src);
						$w=$size[0];
						$h=$size[1];
						$rate=$w/$h;
						$w=500;
						$h=$w/$rate;
					}
				?>	
					<table width='100%' cellpadding="0" cellspacing="0">
						<tr>
							<td valign='top'>
								<div class="column last alltutorials">
									<ul style="width: 200px;">
										<li>
										<h3><a class="arrow"> <span style='font-size:14px;font-weight:bold;color:#444444;font-style:italic'>Mã hàng</span>
										<div style='color:#0088CC;margin-top:10px;font-size:20px' align="center">
											<?php echo $rowProduct["code"]==""?"&nbsp;":$rowProduct["code"];?>
										</div>
										 </a></h3>					 
										</li>
										<li>
										<h3><a class="arrow"> <span style='font-size:14px;font-weight:bold;color:#444444;font-style:italic'>Đơn vị tính</span>
										<div style='color:#0088CC;margin-top:10px;font-size:20px' align="center">
											<?php echo $rowProduct["unit"]==""?"&nbsp;":$rowProduct["unit"];?>
										</div>
										</a></h3>					
										</li>
										<li style='border-bottom: 0px' >
										<h3><a class="arrow" href='?zone=contact&content=<?php echo $contactContent;?>#spanContact' title='Liên hệ ngay với chúng tôi để có giá sản phẩm tốt nhất'> <span style='font-size:14px;font-weight:bold;color:#444444;font-style:italic'>Giá bán</span><br><br>
											<img src='images/box_full_product_best_price.jpg' alt='Liên hệ ngay với chúng tôi để có giá sản phẩm tốt nhất' style='margin-left:30px' width='100px'/>
										</a></h3>					
										</li>						
									</ul>
								</div>
							</td>
							<td align='center' valign='middle' style='padding-left:30px;' rowspan='2'>
								<div style="font-size:40px;font-family:Arial;color:#223344;padding-top:25px;padding-bottom:20px">
									<?php echo $rowProduct["name"]==""?"&nbsp;":$rowProduct["name"];?>
								</div>
								<div style="font-size:18px;font-family:Arial;color:#888888;padding-bottom:15px">
									<?php echo $rowProduct["quote"]==""?"&nbsp;":$rowProduct["quote"];?>
								</div>	
								<br>
								<table cellspacing='0' style='padding: 0pt; border: medium none; margin: 0pt;width:100%; border-collapse: collapse;'>
									<tbody style='padding: 0pt; border: medium none; margin: 0pt;'>
										<tr style='padding: 0pt; border: medium none; margin: 0pt; height: 10px;'>
											<td>
											</td>
											<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px 0px transparent; width: 10px;'>
											</td>
											<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px -40px transparent;  width: 10px;'>
											</td>
											<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 10px 0px transparent; width: 10px;'>
											</td>
											<td>
											</td>
										</tr>
										<tr style='padding: 0pt; border: medium none; margin: 0pt; height: auto;'>
											<td>
											</td>
											<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px -80px transparent; '>
											</td>						
											<td style='padding: 0pt; border: medium none; margin: 0pt; position: relative; background-color:#FFFFFF;' valign='bottom' align='center'>
												<a href='?zone=contact&content=<?php echo $contactContent;?>#spanContact' title='Liên hệ ngay với chúng tôi để có giá sản phẩm tốt nhất' >
													<img style='vertical-align:middle;' height='<?=$h?> px' width='<?=$w?> px' alt="<?php echo $rowProduct['alt']?>" title='<? echo $o_src;?>' src="<?php echo $src;?>">
												</a>
											</td>
											<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 10px -80px transparent; '>
											</td>
											<td>
											</td>
										</tr>
										<tr style='padding: 0pt; border: medium none; margin: 0pt;height: 10px;'>
											<td>
											</td>
											<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px -30px transparent; '>
											</td>
											<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt;  background: url(images/rounded_white.png) repeat scroll 0px -70px transparent;'>							
											</td>
											<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 10px -30px transparent; '>
											</td>
											<td>
											</td>
										</tr>
									</tbody>
								</table>				
							</td>
						</tr>
						<tr>
							<td valign="bottom">
								<div class="column last alltutorials" >
									<ul style="width: 200px;">	
										<li></li>					
										<li class="last" style='padding-bottom:0px;'>
										<h3><a class="arrow"> <span style='font-size:14px;font-weight:bold;color:#444444;font-style:italic'>Thông tin chi tiết</span>
										</a></h3>
										</li>
									</ul>
								</div>
							</td>
						</tr>
						<tr>
							<td colspan='2'>
								<br>
								<?php echo $rowProduct["detail"];?>
							</td>
						</tr>
						<tr>
							<td colspan='2' align="right">
								<a href='?zone=contact&content=<?php echo $contactContent;?>#spanContact' title='Liên hệ ngay với chúng tôi để có giá sản phẩm tốt nhất' style='font-style:italic'>
									Liên hệ về sản phẩm
								</a>
							<td>
						<tr>
					</table>
				<?php 
					$tmp="Sản phẩm khác";
					echo "<br><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#ff8201;color:white;padding:4px 10px'>$tmp</span><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#cccccc;color:white;padding:4px 10px'>$tmp</span><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#eeeeee;color:white;padding:4px 10px'>$tmp</span><br><br>&nbsp;";
					while($rowProduct=mysql_fetch_array($resProduct))
					{
						echo "<br/><a href='?zone=news&id=$rowNews[id]' ><span style=\"margin-right:8px;background: url('') no-repeat scroll 100% 60% transparent; float:left;height:17px;width:4px\"></span><span >$rowProduct[name]</span>&nbsp;<span style='color:#888888;font-size:12px'>$rowProduct[quote]</span></a><br>";
					}
					echo '<br/><br/>';
				}
				else if($zone=="searchproduct")
				{
					include ("modules/product/search.php");
				}
				else if($zone=="news")
				{
					$sqlNews="(SELECT * FROM tbl_news WHERE id='$_GET[id]') UNION (SELECT * FROM tbl_news WHERE id<>'$_GET[id]' LIMIT 0,4)";
					$resNews=mysql_query($sqlNews) ;
					$rowNews=mysql_fetch_array($resNews);
					echo $rowNews['detail'];
					$tmp="Thông tin khác";
					echo "<br><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#ff8201;color:white;padding:4px 10px'>$tmp</span><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#cccccc;color:white;padding:4px 10px'>$tmp</span><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#eeeeee;color:white;padding:4px 10px'>$tmp</span><br><br>&nbsp;";
					while($rowNews=mysql_fetch_array($resNews))
					{
						echo "<br><a href='?zone=news&id=$rowNews[id]' ><span style=\"margin-right:8px;background: url('') no-repeat scroll 100% 60% transparent; float:left;height:17px;width:4px\"></span><span >$rowNews[title]</span></a><br>";
					}	
					echo '<br/></br/>';
				}
				else if($zone=="homepage")
				{
					$sql="SELECT * FROM tbl_news";
					$res=mysql_query($sql) ;
					$tmp1="";
					$tmp2="";
					while($row=mysql_fetch_array($res))
					{
						if($row["image"]=="")
							$src="images/productbrowser_noimage.jpg";
						else
						{
							$src=$o_src="_thumbs/images/news/$row[image]";
							if(!file_exists($src))
								$src="images/productbrowser_noimage.jpg";
						}	
						$detail=strip_tags($row['detail']);
						if(strlen($detail)>$numChar)
						{
							$detail=substr($detail,0,$numChar);	
							$pos=strrpos($detail," ");
							if($pos!==false);
								$detail=substr($detail,0,$pos);
						}
						$tmp="
						<tr>
							<td style='width:162px' valign='top'>
								<a href='?zone=news&id=$row[id]' >
									<table cellspacing='0' style='padding: 0pt; border: medium none; margin: 0pt;width:100%; border-collapse: collapse;'>
										<tbody style='padding: 0pt; border: medium none; margin: 0pt;'>
											<tr style='padding: 0pt; border: medium none; margin: 0pt; height: 10px;'>
												<td>
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px 0px transparent; width: 10px;'>
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px -40px transparent;  width: 10px;'>
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 10px 0px transparent; width: 10px;'>
												</td>
												<td>
												</td>
											</tr>
											<tr style='padding: 0pt; border: medium none; margin: 0pt; height: auto;'>
												<td>
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px -80px transparent; '>
												</td>						
												<td style='padding: 0pt; border: medium none; margin: 0pt; position: relative; background-color:#FFFFFF;' valign='bottom' align='center'>
													<img src='$src' title='$o_src' alt='$row[title]'/>						
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 10px -80px transparent; '>
												</td>
												<td>
												</td>
											</tr>
											<tr style='padding: 0pt; border: medium none; margin: 0pt;height: 10px;'>
												<td>
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px -30px transparent; '>
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt;  background: url(images/rounded_white.png) repeat scroll 0px -70px transparent;'>							
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 10px -30px transparent; '>
												</td>
												<td>
												</td>
											</tr>
										</tbody>
									</table>
								</a>
								<br>
							</td>
							<td align='left' valign='top' style='padding:5px'>
								<a href='?zone=news&id=$row[id]'>
									<span style='color:blue'>$row[title]</span>
								</a>
								<br>
								$detail
							</td>
						</tr>
						<tr>
							<td colspan='2' align='right'>
								<a href='?zone=news&id=$row[id]' style='font-style:italic'>
									Xem chi tiết
								</a>
							</td>
						</tr>";
						if($i%2==0)
							$tmp1.=$tmp;
						else
							$tmp2.=$tmp;
						$i++;
					} 
					$tmp="Thông tin sản phẩm";
					echo "
						<br><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#ff8201;color:white;padding:4px 10px'>$tmp</span><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#cccccc;color:white;padding:4px 10px'>$tmp</span><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#eeeeee;color:white;padding:4px 10px'>$tmp</span><br>&nbsp;
						<table border='0' cellspacing='0' cellpadding='0' style='width:100%'>
							<tr>
								<td style='width:48%' valign='top'>
									<table border='0' cellspacing='0' cellpadding='0' style='width:100%'>
										$tmp2
									</table>
								</td>
								<td style='width:4%'>
								</td>
								<td valign='top'>
									<table border='0' cellspacing='0' cellpadding='0' style='width:100%'>
										$tmp1
									</table>
								</td>
							</tr>
						 </table>";
										
					$sql2="SELECT `name`,`id` FROM tbl_product_type";
					$res2=mysql_query($sql2) ;
					$tmp1="";
					$tmp2="";
					$i=0;
					while($row2=mysql_fetch_array($res2))
					{	
						$sql="SELECT * FROM tbl_product WHERE `focus`='1' AND product_type_id='$row2[id]' LIMIT 0,1";
						$res=mysql_query($sql) ;
						$row=mysql_fetch_array($res);
						if($row["image"]=="")
							$src="images/productbrowser_noimage.jpg";
						else
						{
							$o_src=$src="_thumbs/images/product/$row[image]";
							if(!file_exists($src))
								$src="images/productbrowser_noimage.jpg";
						}	
						$detail=strip_tags($row['detail']);
						if(strlen($detail)>$numChar)
						{
							$detail=substr($detail,0,$numChar);	
							$pos=strrpos($detail," ");
							if($pos!==false);
								$detail=substr($detail,0,$pos);
						}
						$tmp="
						<tr>
							<td colspan='2' style='".($i>1?"border-top:1px solid #eeeeee;":"")."'>
								<br>
								<a href='?zone=searchproduct&type=$row2[id]' title='$row2[detail]' style='font-weight:bold;text-transform:uppercase;color:blue'>
									&nbsp;&nbsp;&nbsp;$row2[name]
								</a>
							</td>
						</tr>
						<tr style='min-height:145px;height:145px'>
							<td style='width:162px' valign='top'>
								<a href='?zone=product&id=$row[id]' title='$row[quote]'>
									<table cellspacing='0' style='padding: 0pt; border: medium none; margin: 0pt;width:100%; border-collapse: collapse;'>
										<tbody style='padding: 0pt; border: medium none; margin: 0pt;'>
											<tr style='padding: 0pt; border: medium none; margin: 0pt; height: 10px;'>
												<td>
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px 0px transparent; width: 10px;'>
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px -40px transparent;  width: 10px;'>
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 10px 0px transparent; width: 10px;'>
												</td>
												<td>
												</td>
											</tr>
											<tr style='padding: 0pt; border: medium none; margin: 0pt; height: auto;'>
												<td>
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px -80px transparent; '>
												</td>						
												<td style='padding: 0pt; border: medium none; margin: 0pt; position: relative; background-color:#FFFFFF;' valign='bottom' align='center'>
													<img width='160px' title='$o_src' src='$src' alt='$row[alt]'/>						
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 10px -80px transparent; '>
												</td>
												<td>
												</td>
											</tr>
											<tr style='padding: 0pt; border: medium none; margin: 0pt;height: 10px;'>
												<td>
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 0px -30px transparent; '>
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt;  background: url(images/rounded_white.png) repeat scroll 0px -70px transparent;'>							
												</td>
												<td style='padding: 0pt; border: medium none; margin: 0pt; line-height: 0pt; font-size: 0pt; background: url(images/rounded_white.png) repeat scroll 10px -30px transparent; '>
												</td>
												<td>
												</td>
											</tr>
										</tbody>
									</table>
								</a>
								<br>
							</td>
							<td align='left' valign='top' style='padding:5px'>
								<a href='?zone=product&id=$row[id]'>
									<span style='color:blue'>$row[name]</span>
								</a>
								<br>
								$detail
							</td>
						</tr>
						<tr>
							<td colspan='2' align='right'>
								<a href='?zone=product&id=$row[id]' style='font-style:italic'>
									Xem chi tiết
								</a>
							</td>
						</tr>";
						if($i%2==0)
							$tmp1.=$tmp;
						else
							$tmp2.=$tmp;
						$i++;
					} 
					$tmp="Sản phẩm tiêu biểu";
					echo "
						<br><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#ff8201;color:white;padding:4px 10px'>$tmp</span><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#cccccc;color:white;padding:4px 10px'>$tmp</span><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#eeeeee;color:white;padding:4px 10px'>$tmp</span><br>&nbsp;
						<table border='0' cellspacing='0' cellpadding='0' style='width:100%'>
							<tr>
								<td style='width:48%' valign='top'>
									<table border='0' cellspacing='0' cellpadding='0' style='width:100%'>
										$tmp1
									</table>
								</td>
								<td style='width:4%'>
								</td>
								<td valign='top'>
									<table border='0' cellspacing='0' cellpadding='0' style='width:100%'>
										$tmp2
									</table>
								</td>
							</tr>
						 </table>";
					$tmp="Giới thiệu công ty";
					echo "
						<br><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#ff8201;color:white;padding:4px 10px'>$tmp</span><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#cccccc;color:white;padding:4px 10px'>$tmp</span><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#eeeeee;color:white;padding:4px 10px'>$tmp</span><br>&nbsp;
						<table border='0' cellspacing='0' cellpadding='0' style='width:100%'>
							<tr>
								<td align='left' valign='top' style='padding:5px'>
									<a href='?zone=introduction'>
										<span style='color:blue;'>Công ty Phú Trung Hoa</span>
									</a>
									<br>
									Chuyên sản xuất, mua bán: sản phẩm ngành may mặc, trang thiết bị cứu hộ - cứu nạn (phao cứu sinh, áo phao, xuồng bơm hơi và composite, nhà bạt), trang thiết bị bảo vệ (nón, khiên, bao tay và quần áo bảo hộ) (trừ tẩy nhuộm, hồ in trên sản phẩm, tái chế phế thải tại trụ sở). Mua bán máy móc thiết bị phòng chống trộm, camera quan sát, thiết bị phòng cháy - chữa cháy, máy rà kim loại, máy móc thiết bị vật tư phục vụ ngành công-nông nghiệp, xe gắn máy, xe ô tô và xe cơ giới, thiết bị phụ tùng phục vụ sản xuất và tiêu dùng, thiết bị xử lý ô nhiễn môi trường, phụ tùng xe hơi. Ðại lý mua bán và ký gởi hàng hóa./.
								</td>
							</tr>
							<tr>
								<td colspan='2' align='right'>
									<a href='?zone=introduction' style='font-style:italic'>
										Xem chi tiết
									</a>
								</td>
							</tr>
					 </table><br/><br/>";
				}
				else if($zone=="introduction" ||  $zone=="humanresources" || $zone=="contact")
				{
					echo $rowConfigs[$zone];
				}
				else if($zone=="actioncontact")
				{
					include ("modules/contact/actionContact.php");
				}	
				if($zone=="contact")
				{
				?>
					<script>
						function submitFormContact()
						{
							if(document.formContact.fullname.value=='')
							{
								alert('Vui lòng nhập họ tên của bạn!')
								document.formContact.fullname.focus();
								return false;
							}
							if(document.formContact.phone.value=='')
							{
								alert('Vui lòng nhập số điện thoại của bạn!')
								document.formContact.phone.focus();
								return false;
							}
							if(document.formContact.email.value=='')
							{
								alert('Vui lòng nhập email của bạn!')
								document.formContact.email.focus();
								return false;
							}
							if(document.formContact.content.value=='')
							{
								alert('Vui lòng nhập nội dung liên hệ!')
								document.formContact.content.focus();
								return false;
							}
						}
					</script>
					<?php 
					$tmp="Gửi mail liên hệ";
					echo "<br><span id='spanContact' style='float:right;font-size:20px;text-transform:uppercase;background-color:#ff8201;color:white;padding:4px 10px'>$tmp</span><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#cccccc;color:white;padding:4px 10px'>$tmp</span><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#eeeeee;color:white;padding:4px 10px'>$tmp</span><br><br>&nbsp;";
					?>
					<div>
						<form method='post' action='?zone=actioncontact' onsubmit="return submitFormContact();" name='formContact'>
							<table width="90%" cellpadding="0" cellspacing="0" border="0" style='font-family:Tahoma;font-size:14px;font-style: italic;line-height: 27px;'>
								<tr>
									<th width="130px">
										Công ty						
									</th>
									<td width="20px">
									</td>
									<td>
										<input type="text" name='companyname' style='width:200px'></input>
									</td>
								</tr>	
								<tr>
									<th>
										Họ tên			
									</th>
									<td>
										<img src='images/box_full_contact_asterisk.gif'  alt='*'/>
									</td>
									<td>
										<input type="text" name='fullname' style='width:200px'></input>
									</td>
								</tr>			
								<tr>
									<th>
										Địa chỉ						
									</th>
									<td>
									</td>
									<td>
										<input type="text" name='address' style='width:200px'></input>
									</td>
								</tr>
								<tr>
									<th>
										Số điện thoại					
									</th>
									<td>
										<img src='images/box_full_contact_asterisk.gif' alt='*'/>
									</td>
									<td>
										<input type="text" name='phone' style='width:200px'></input>
									</td>
								</tr>
								<tr>
									<th>
										Email							
									</th>
									<td>
										<img src='images/box_full_contact_asterisk.gif' alt='*'/>
									</td>
									<td>
										<input type="text" name='email' style='width:200px'></input>
									</td>
								</tr>
								<tr>
									<th>
										Nội dung liên hệ							
									</th>
									<td>
										<img src='images/box_full_contact_asterisk.gif'  alt='*'/>
									</td>
									<td>
										<textarea rows="15" style='width:100%' name='content'><?php echo urldecode($_GET['content']);?></textarea>
									</td>
								</tr>
								<tr>
									<th colspan="2">
										<img src='images/box_full_contact_center_map.png' id='imgCenterMap' style='width: 64px;cursor: pointer;float:left' title='Địa điểm công ty Phú Trung Hoa' onclick='go()' alt='Địa điểm công ty Phú Trung Hoa'/>						
									</th>
									<td valign="middle">
										<input type="submit" value="Gửi mail" style='float:left;' title='Gửi mail liên hệ công ty Phú Trung Hoa'></input> <img src='images/box_full_contact_asterisk.gif' style='float:left;vertical-align: middle;' alt='*'/> <span style='float:left;'>Thông tin bắt buộc</span>						
									</td>
								</tr>
							</table>
						</form>	
						<?php echo "<span style='float:right;font-size:20px;text-transform:uppercase;background-color:#ff8201;color:white;padding:4px 10px'>BẢN ĐỒ VỊ TRÍ CÔNG TY PHÚ TRUNG HOA</span><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#cccccc;color:white;padding:4px 10px'>PHÚ TRUNG HOA</span><span style='float:right;font-size:20px;text-transform:uppercase;background-color:#eeeeee;color:white;padding:4px 10px'>P T H</span><br>";?>	
						<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo $apikey;?>&sensor=true' type='text/javascript'></script>
						<script type="text/javascript">	
							 var map = null;
							 var geocoder = null;
							 var lat, lng;
							 
							function initialize() {
							  if (GBrowserIsCompatible()) {
								map = new GMap2(document.getElementById("map_canvas"));
								lat=10.79759;
								lng=106.60504;					
								map.setCenter(new GLatLng(lat, lng), 13);
								map.setUIToDefault();
								geocoder = new GClientGeocoder();
								var marker = new GMarker(new GLatLng(lat, lng),{draggable: false});
								map.addOverlay(marker);
								document.getElementById('imgCenterMap').style.display='';
							  }
							}
							 
							function go() {
								map.setCenter(new GLatLng(lat, lng));	
							}	
						</script>
						<div id="map_canvas" style="clear:both;width: 100%; height: 320px;margin-bottom: 17px;margin-top: 5px"></div>
					</div>				
				<?php 
				}
				?>
			</div>
		
		<div class="cap bottom" style='margin-left:-2px;margin-right:0px;'></div>
		</div>
		<!--/box fullspan--></div>
		<!--/grid3col-->
		
<!-------------------->	
<!-- END BOXCONTENT -->
<!-------------------->		
		
		</td>
	</tr>
	<tr>
		<td style='height:100%'>&nbsp;</td>
	</tr>
</table>
	
</div>
</div>

<div style="background-position:right -30px;background-color:black;background-image:url('images/global_bgr.jpg'); background-repeat: repeat-x;padding:10px">
	<p style="background-position:right -30px; margin:-10px -10px 0px 0px;background-color:black;background-image:url('images/global.jpg');background-repeat:no-repeat;width: 300px;height:160px;cursor:pointer;float:right" title="Xem vị trí công ty Phú Trung Hoa trên bản đồ" onclick="
		window.open('map.php?key=<?php echo $apikey;?>','map','width=518,height=360');"></p>
	<span style='color:white;font-size:12px;'>		
		<b>Địa chỉ:&nbsp;&nbsp;</b> <span style='color:white'>150/31 khu phố 10, đường 26.3, P.Bình Hưng Hòa, Q.Bình Tân, TP.HCM</span>
		<br><b>Điện thoại:&nbsp;&nbsp;</b> <span style='color:white'>08.5444 0718 - 08.5444 2808</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Fax:&nbsp;&nbsp;</b> <span style='color:white'>08.5444 0718</span>
		<br><b>ĐTDĐ:&nbsp;&nbsp;</b> <span style='color:white'>0918 162 975 - 0903 035 348 - 0913 769 648</span>
		<br>&nbsp;
		<br>&nbsp;
	</span>
	<br>	
	<div style='margin-bottom:4px;margin-right:278px;text-align:right'>
		<?php 
		foreach ($arrMenu as $key=>$value)
		{
			if($arrMenu[$key]["width"]!="")
				echo "<a href='?zone=$key' style='color:white;font-size:16px;margin-left:17px;text-transform:uppercase;'>$value[vnTitle]</a>";	
		}
		?>			
	</div>
	<p style='margin-top:4px;margin-right:278px;border-top:3px solid white;color:#EEEEEE;'>			
		Copyright © 2010 Phu Trung Hoa. All rights reserved.
	</p>
</div>
	
</body>
</html>

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-22625184-2']);
  _gaq.push(['_setDomainName', '.phutrunghoa.vn']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<!--<?
//disconnect db
Model::disconnect();
?>-->








